﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MVC4App.Areas.Administrators.Models
{
    public class PermissionModel
    {
        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>
        /// The identifier.
        /// </value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>
        /// The title.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(NmResources.AdminErrorResource), ErrorMessageResourceName = "Required")]
        [Display(Name = "lbTitle", ResourceType = typeof(NmResources.AdminResource))]
        [DataType(DataType.Text)]
        [StringLength(50, ErrorMessageResourceType = typeof(NmResources.AdminErrorResource),ErrorMessageResourceName = "StringLength50")]
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the code.
        /// </summary>
        /// <value>
        /// The code.
        /// </value>
        [Required(ErrorMessageResourceType = typeof(NmResources.AdminErrorResource), ErrorMessageResourceName = "Required")]
        [Display(Name = "lbCode", ResourceType = typeof(NmResources.AdminResource))]
        [DataType(DataType.Text)]
        [StringLength(50, ErrorMessageResourceType = typeof(NmResources.AdminErrorResource), ErrorMessageResourceName = "StringLength50")]
        public string Code { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        [Display(Name = "lbDescription", ResourceType = typeof(NmResources.AdminResource))]
        [DataType(DataType.Text)]
        [StringLength(255, ErrorMessageResourceType = typeof(NmResources.AdminErrorResource), ErrorMessageResourceName = "StringLength255")]
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the order.
        /// </summary>
        /// <value>
        /// The order.
        /// </value>
        public int Order { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [status].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [status]; otherwise, <c>false</c>.
        /// </value>
        public bool Status { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [show default].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [show default]; otherwise, <c>false</c>.
        /// </value>
        public bool ShowDefault { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [has image].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [has image]; otherwise, <c>false</c>.
        /// </value>
        public bool HasImage { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [multi row].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [multi row]; otherwise, <c>false</c>.
        /// </value>
        public bool MultiRow { get; set; }

        /// <summary>
        /// Gets or sets the permission in sites.
        /// </summary>
        /// <value>
        /// The permission in sites.
        /// </value>
        public string PermissionInSites { get; set; }        
    }
}